package com.zzz.user.controller;

import com.zzz.user.entity.UUser;
import com.zzz.user.service.IUUserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @DubboReference(version = "${dubbo.consumer.IUUserService.version}")
    IUUserService userService;

    @GetMapping("/users")
    public List<UUser> userList(){
        return userService.list();
    }
}
